<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1>手机号登录/注册</h1>
        <label for="mobile">
            +86 <input type="text" v-model='mobile' id="mobile">
        </label>
        <label for="code">
            验证码: <input type="text" v-model='code' id="code">
        </label>
        <div>
            <button @click = 'submit'>确认</button>
        </div>
    </div>
</body>
<script src="https://cn.vuejs.org/js/vue.js"></script>
<script>
    let vm = new Vue({
        el:"#app",
        data:{
            mobile:"",
            code:""
        },
        methods: {
            submit:function(){
                console.log(this.mobile,this.code);
            }
        }
    });
</script>
</html>